<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/jquery-3.5.1.min.js"></script>
</head>
<body>
    <script>
        var arr = [2, 4, 7];
        $.each(arr,function(index,item){
               console.log(index,item); 
        })
    </script>
    
</body>
</html>